﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyAlbum.Model;

namespace MyAlbum.Data
{
    public interface IEntryRepository : IRepository<MyAlbum.Model.Entry>
    {
        List<MyAlbum.Model.Entry> GetEntriesByTagName(string tagName, bool visible);

        MyAlbum.Model.Entry GetEntryById(string entryId, bool visible);

        MyAlbum.Model.Entry GetLatestEntry(bool visible);

        List<MyAlbum.Model.Entry> GetEntriesByAlbum(string parentId, int pageNumber, int count, bool visible);
        int GetEntriesCount(bool visible);

        List<MyAlbum.Model.Entry> GetItems(int pageNumber, int count, bool visible);

        List<MonthSummary> GetEntriesByMonthsSummary(bool visible);

        /// <summary>
        /// Load random visible entries summary (no replies or tags)
        /// </summary>
        /// <param name="count">The max number of entries to load</param>
        /// <returns>List of Entry</returns>
        List<Entry> LoadRandomEntriesSummary(int count);

        /// <summary>
        /// Load the latest entries
        /// </summary>
        /// <param name="count">The number of entries to load</param>
        /// <returns>List of Entry</returns>
        List<Entry> GetLatestEntries(int count, bool visible);

        int CountItems(bool visible);
    }
}
